'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/user/:id', controller.user.info);
  router.get('/download', controller.download.xls);

  // 此处的 show，实际上并不属于后端的部分。界面的显示由前端负责。
  router.get('/upload', controller.upload.show);

  router.post('/upload', controller.upload.xls);
};
